function traverse(data) {
  data.forEach((item) => {
    console.log(item.label); // 打印当前层级的 label

    // 递归遍历子级
    if (item.children && item.children.length > 0) {
      traverse(item.children);
    }
  });
}
if (
  (this.queryPage.current - 1) * this.queryPage.size >= this.total - 1 &&
  this.queryPage.current != 1
) {
  this.queryPage.current = this.queryPage.current - 1;
}

const data = [
  {
    label: "一级 1",
    children: [
      {
        label: "二级 1-1",
        children: [
          {
            label: "三级 1-1-1",
          },
        ],
      },
    ],
  },
  {
    label: "一级 2",
    children: [
      {
        label: "二级 2-1",
        children: [
          {
            label: "三级 2-1-1",
          },
        ],
      },
      {
        label: "二级 2-2",
        children: [
          {
            label: "三级 2-2-1",
          },
        ],
      },
    ],
  },
];

traverse(data);
<div class="q_main">
  <div class="title">${point.name}</div>
  <div class="content">
    <div class="item">
      <div class="label">发电功率：</div>
      <div class="value">${point.power} KMW</div>
    </div>
    <div class="item">
      <div class="label">今日发电量:</div>
      <div class="value">${point.todayPowerGeneration} 度</div>
    </div>
    <div class="item">
      <div class="label">今日等效时数:</div>
      <div class="value">${point.todayEquivalent}</div>
    </div>
    <div class="item">
      <div class="label">未处理告警数:</div>
      <div class="value">${point.abnormalCount}</div>
    </div>
  </div>
  <div class="footer"></div>
  <div class="closeBtn" onclick="onCloseInfo()"></div>
</div>;
{
  "type": "FeatureCollection",
  "features":[]
}